The polynomial $P(x)$ is a monic, quartic polynomial with real coefficients, and two of its roots are $\cos \theta + i \sin \theta$ and $\sin \theta + i \cos \theta,$ where $0 < \theta < \frac{\pi}{4}.$  When the four roots of $P(x)$ are plotted in the complex plane, they form a quadrilateral whose area is equal to half of $P(0).$  Find the sum of the four roots.
Explanation: Since the polynomial $P(x)$ has real coefficients, if $z$ is a nonreal root of $P(x),$ then so is its conjugate $\overline{z}.$  Thus, the other two roots of $P(x)$ are $\cos \theta - i \sin \theta$ and $\sin \theta - i \cos \theta.$  When we plot the four roots (all of which lie on the unit circle), we obtain a trapezoid.

[asy]
unitsize(2 cm);

pair A, B, C, D;

A = dir(30);
B = dir(60);
C = dir(-60);
D = dir(-30);

filldraw(A--B--C--D--cycle,gray(0.7));
draw(Circle((0,0),1));
draw((-1.2,0)--(1.2,0));
draw((0,-1.2)--(0,1.2));

dot("$\cos \theta + i \sin \theta$", A, A);
dot("$\sin \theta + i \cos \theta$", B, B);
dot("$\sin \theta - i \cos \theta$", C, C);
dot("$\cos \theta - i \sin \theta$", D, D);
[/asy]

The area of this trapezoid is
\begin{align*}
\frac{2 \cos \theta + 2 \sin \theta}{2} \cdot (\cos \theta - \sin \theta) &= (\cos \theta + \sin \theta)(\cos \theta - \sin \theta) \\
&= \cos^2 \theta - \sin^2 \theta \\
&= \cos 2 \theta.
\end{align*}The monic quartic $P(x)$ is
\begin{align*}
&(x - (\cos \theta + i \sin \theta))(x - (\cos \theta - i \sin \theta))(x - (\sin \theta + i \cos \theta))(x - (\sin \theta - i \cos \theta)) \\
&= (x^2 - 2x \cos \theta + 1)(x^2 - 2x \sin \theta + 1).
\end{align*}Then $P(0) = 1,$ so the area of the quadrilateral is $\frac{1}{2}.$  Hence,
\[\cos 2 \theta = \frac{1}{2}.\]Since $0 < 2 \theta < \frac{\pi}{2},$ we must have $2 \theta = \frac{\pi}{3},$ or $\theta = \frac{\pi}{6}.$

The sum of the four roots is then $2 \cos \theta + 2 \sin \theta = \boxed{1 + \sqrt{3}}.$